# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
  def fmt_time(str,flag)
    if flag=="d"
      str.strftime("%Y-%m-%d") unless str.nil?
    elsif flag=="s"
      str.strftime("%H:%M:%S") unless str.nil?
    else
      str.strftime("%Y-%m-%d %H:%M:%S") unless str.nil?
    end  
  end
  
  def base_language_only
    yield if Locale.base?
  end
  
  def not_base_language
    yield unless Locale.base?
  end

end
